CREATE TABLE [lookup].[Lookup]
(
[LookupId] [int] NOT NULL IDENTITY(1, 1),
[Code] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DisplyIndex] [int] NOT NULL,
[ParentLookupId] [int] NULL,
[Active] [bit] NOT NULL,
[Deleted] [bit] NOT NULL,
[CreatedBy] [int] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[ModifiedBy] [int] NULL,
[ModifiedOn] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [lookup].[Lookup] ADD CONSTRAINT [PK_Lookup] PRIMARY KEY CLUSTERED  ([LookupId]) ON [PRIMARY]
GO
ALTER TABLE [lookup].[Lookup] ADD CONSTRAINT [FK_Lookup_Lookup] FOREIGN KEY ([ParentLookupId]) REFERENCES [lookup].[Lookup] ([LookupId])
GO
